using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace c_
{
    public class NewClass
    {
        public class Vehicle
    {
        private int wheels;
        private double weight;

        public Vehicle()
        {
        }

        public Vehicle(int wheels, double weight)
        {
            this.wheels = wheels;
            this.weight = weight;
        }

        public void vehicle(int wheels,double weight)
        {
            this.wheels = wheels;
            this.weight = weight;
            Console.WriteLine($"汽车的车轮个数：{this.wheels}；车重：{this.weight}t");
        }
        
    }
    public class Car : Vehicle
    {
        private int loader;

        public Car(int wheels,double weight,int loader) : base(wheels,weight)
        {
            this.loader = loader;
            Console.WriteLine($"小车的车轮个数：{wheels}；车重：{weight}；载人数：{this.loader}");
        }

    }

    public class Truck : Car
    {
        private int payload;

        public Truck(int wheels, double weight, int loader,int payload) : base(wheels, weight, loader)
        {
            this.payload = payload;
            Console.WriteLine($"卡车的车轮个数：{wheels}；车重：{weight}；载人数：{loader};载重量：{this.payload}");
        }

    }
}
}